# -*- coding: utf-8 -*-
# @Time : 2019/1/2 16:05
# @Author : Administrator
# @File : test001.py
# @Project : 4.Python
# @title :
import psutil
import time

def monitor(second):
    while(True):
        # print("CPU使用率 内存使用率 C盘")
        cpu = str(psutil.cpu_percent())+'%'
        disk = str(psutil.disk_usage('C:\\').percent)+'%'
        memory = str(psutil.virtual_memory().percent)+'%'
        net = str(psutil.net_io_counters().bytes_recv)
        print(cpu)
        print(disk)
        print(memory)
        print(net)

monitor(5)
